<template lang="html">
    <div class="">
        <div class="">
            123123
        </div>
        input:<textarea name="name" v-model="info" rows="8" cols="80"></textarea>
        <message-child @my-event="listenChild" :info="info">
            <p>我是父组件传递的模板，会显示到子组件的slot位置</p>
            <!-- 具名slot -->
            <div slot="header">
                我是header
            </div>

            <div slot="footer">
                我是footer
            </div>

        </message-child>
    </div>
</template>

<script>
import MessageChild from '@/base/messageChild.vue'
export default {
	data() {
		return {
			info: [1, 2, 43, 5]
		}
	},
	components: {
		MessageChild
	},
	methods: {
		listenChild(dataFromChild) {
			console.log('子组件emit过来的数据：', dataFromChild)
		}
	}
}
</script>

<style lang="css">
</style>
